from zope.interface import implements

from twisted.plugin import IPlugin
from twisted.internet import defer

from pyhnode import interfaces

import time

class timePlugin(object):

    implements(IPlugin, interfaces.IPlugins)

    def getNames(self):
        return ["time"]

    def getValue(self, name):
        return defer.succeed(str(time.time()))

    def getAlert(self, name):
        return False

    def getConfig(self, name):
        return "time version:0.1,type:float,metric:seconds"

    def configure(self):
        pass

tp = timePlugin()
